﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using AutoR.Models;
using AutoR.Services;
using Prism.Mvvm;
using Prism.Navigation;
using Prism.Services;

namespace AutoR.ViewModels.Home
{
	// Token: 0x020000B4 RID: 180
	public class EquipmentListViewModel : BindableBase, INavigationAware, INavigatedAware, INavigatingAware
	{
		// Token: 0x170000F1 RID: 241
		// (get) Token: 0x06000383 RID: 899 RVA: 0x00049DAE File Offset: 0x00047FAE
		private INavigationService NavigationService { get; }

		// Token: 0x170000F2 RID: 242
		// (get) Token: 0x06000384 RID: 900 RVA: 0x00049DB6 File Offset: 0x00047FB6
		private IPageDialogService PageDialogService { get; }

		// Token: 0x170000F3 RID: 243
		// (get) Token: 0x06000385 RID: 901 RVA: 0x000408F6 File Offset: 0x0003EAF6
		public GameData Game
		{
			get
			{
				return Runtime.Game;
			}
		}

		// Token: 0x170000F4 RID: 244
		// (get) Token: 0x06000386 RID: 902 RVA: 0x00049DBE File Offset: 0x00047FBE
		// (set) Token: 0x06000387 RID: 903 RVA: 0x00049DC8 File Offset: 0x00047FC8
		public List<UserEquipment> Equip
		{
			[CompilerGenerated]
			get
			{
				return this.<Equip>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<Equip>k__BackingField, value))
				{
					return;
				}
				this.<Equip>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Equip);
			}
		}

		// Token: 0x06000388 RID: 904 RVA: 0x00049DF8 File Offset: 0x00047FF8
		public EquipmentListViewModel(INavigationService navigationService, IPageDialogService pageDialogService)
		{
			this.NavigationService = navigationService;
			this.PageDialogService = pageDialogService;
			this.Equip = (from i in this.Game.GetEquipmentList()
			orderby i.Type, i.Star
			select i).ToList<UserEquipment>();
		}

		// Token: 0x06000389 RID: 905 RVA: 0x0004067F File Offset: 0x0003E87F
		public void OnNavigatedFrom(INavigationParameters parameters)
		{
		}

		// Token: 0x0600038A RID: 906 RVA: 0x0004067F File Offset: 0x0003E87F
		public void OnNavigatedTo(INavigationParameters parameters)
		{
		}

		// Token: 0x0600038B RID: 907 RVA: 0x0004067F File Offset: 0x0003E87F
		public void OnNavigatingTo(INavigationParameters parameters)
		{
		}
	}
}
